package com.ch.engine.design.single.lazy;

/**
 * 懒汉模式-线程不安全的，适用于单线程
 */
public class LazyUnsafeSingleton {
    private LazyUnsafeSingleton() {
    }

    private static LazyUnsafeSingleton instance;

    public static LazyUnsafeSingleton getInstance() {
        if (instance == null) {
            instance = new LazyUnsafeSingleton();
        }
        return instance;
    }
}